#ifndef MOTION_REQUEST_SERVER_H
#define MOTION_REQUEST_SERVER_H

#include <boost/asio/io_service.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/shared_array.hpp>

class MotionRequestServer
{
public:
    MotionRequestServer(boost::asio::io_service &io_svc);
    ~MotionRequestServer();

    bool listen(const char *lis_ip, const char *lis_port);
    bool listen(const char *lis_ip, unsigned short lis_port);
    bool listen(const char *lis_port);
    bool listen(unsigned short lis_port);

    void run();
    void stop();

private:

private:
    boost::asio::io_service                &m_io_svc;
    boost::asio::ip::tcp::acceptor         m_acceptor;
	boost::asio::io_context *io_context;
	boost::asio::ip::tcp::socket *new_sock;
    int tagLenM;
    bool isRun;
	bool isWaitCon;
};


#endif